package com.wwmz.spring.cloud.hystrix.command;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

/**
 * created by wumz
 */
public class Test {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        //同步
        String result = new MyHystrixCommand("zhangsan").execute();
        System.out.println(result);

        //异步
//        Future<String> future = new MyHystrixCommand("zhangsan").queue();
//        System.out.println(future.get());
    }
}
